package method.homework1203;

public class work060 {
    public static void main(String[] args) {
        int[][] arr = {{1,2,3},{6,7,8,5,6,8},{3,4,5,6,7,8,9}};
        int count=0;
        for (int j = 0; j < arr.length; j++) {
            int sum=0;
            for (int i = 0; i < arr[j].length; i++) {
                sum+=arr[j][i];
                count+=arr[j][i];
            }
            System.out.println("第"+(j+1)+"小数组的和为："+sum);
        }
        System.out.println("数组的总和为："+count);
    }
}
